//
// Created by xsh on 2025/5/31.
//
// native_engine.h
#pragma once

#include <jni.h>

extern "C" {

// 初始化引擎
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_initEngine(JNIEnv *env, jobject thiz);

// 设置当前乐器
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_setActiveInstrument(JNIEnv *env, jobject thiz, jint index);

// 加载插件
JNIEXPORT jboolean JNICALL Java_com_xsh_opensltest_SlEngine_loadPlugin(JNIEnv *env, jobject thiz, jstring path);

// 发送事件
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_sendEvent(JNIEnv *env, jobject thiz, jstring event, jobject value);

// 播放
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_play(JNIEnv *env, jobject thiz);
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_pause(JNIEnv *env, jobject thiz);
// 停止
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_stop(JNIEnv *env, jobject thiz);

JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_setActiveInstrument(JNIEnv *env, jobject thiz, jint index);

//JNIEXPORT void JNICALL Java_com_xsh_sawsynth_NativeInterface_sendEvent(JNIEnv *env, jobject thiz, jstring event,jobject value) ;
JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_renderToFile(JNIEnv *env, jclass clazz, jstring mode,jstring file_type);

JNIEXPORT void JNICALL Java_com_xsh_opensltest_SlEngine_removePlugin(JNIEnv *env,jobject thiz);
}